import request from '/@/utils/request';

// 查询充电设备收费规则列表
export function listRole(query?: Object) {
  return request({
    url: '/module/charger/power/role/list',
    method: 'get',
    params: query
  })
}

// 查询充电设备收费规则详细
export function getRole(id?: number) {
  return request({
    url: '/module/charger/power/role/' + id,
    method: 'get'
  })
}

// 新增充电设备收费规则
export function addRole(data?: Object) {
  return request({
    url: '/module/charger/power/role',
    method: 'post',
    data: data
  })
}

// 修改充电设备收费规则
export function updateRole(data?: Object) {
  return request({
    url: '/module/charger/power/role',
    method: 'put',
    data: data
  })
}

// 删除充电设备收费规则
export function delRole(id?: number) {
  return request({
    url: '/module/charger/power/role/' + id,
    method: 'delete'
  })
}

// 导出充电设备收费规则
export function exportRole(query?: Object) {
  return request({
    url: '/module/charger/power/role/export',
    method: 'get',
    params: query
  })
}
